package at.fhooe.engine.event.events;

import at.fhooe.engine.event.EventListener;

public class KeyDownEvent extends Event {

	public static final String TYPE = "KeyDownEvent";
	private int m_keyCode;
	
	public KeyDownEvent(int keyCode) {
		super(TYPE);
		m_keyCode = keyCode;
	}
	
	public int getKeyCode() {
		return m_keyCode;
	}

	@Override
	public void processEvent(EventListener eventListener) {
		((Listener) eventListener).onKeyDownEvent(this);	
	}
	
	//embedded listener interface with the specific function call
	public interface Listener extends EventListener {
		public void onKeyDownEvent(KeyDownEvent keyDownEvent);
	}
}
